package org.warehouse.controller;

import org.warehouse.entity.Group;
import org.warehouse.entity.Product;

/**
 * Contains constants for get/set parameters to request/session for transferring data between client and server
 */
public interface Keys {
	/**
	 * Represents list of {@link Group}
	 */
	String GROUPS_KEY = "groups";

	/**
	 * Represents list of {@link Product} which are related with current {@link Group}
	 */
	String PRODUCTS_KEY = "products";

	/**
	 * Represents max count of pages
	 */
	String COUNT_OF_PAGES_KEY = "countOfPage";
	
	/**
	 * Represents start index of pages which is servers for drawing of paging
	 */
	String PAGE_START_INDEX_OF_KEY = "startIndexOfPage";
	
	/**
	 * Represents page navigation<br>
	 * Can contain of {@link Keys#PAGE_NAVIGATE_NEXT_KEY} and  {@link Keys#PAGE_NAVIGATE_PREV_KEY} values
	 */
	String PAGE_NAVIGATE_KEY = "pageNavigate";
	
	/**
	 * Keeps <code>next</code> constant for navigation<br>
	 * TODO remade to enun
	 */
	String PAGE_NAVIGATE_NEXT_KEY = "next";

	/**
	 * Keeps <code>prev</code> constant for navigation<br>
	 * TODO remade to enun
	 */
	String PAGE_NAVIGATE_PREV_KEY = "prev";

	/**
	 * Serves for getting a number of a current page
	 */
	String CURRENT_PAGE_KEY = "currentPage";
	
	/**
	 * Serves for getting a number of a current group
	 */
	String CURRENT_GROUP_KEY = "currentGroup";

	/**
	 * Serves for getting a sort ordering for name field
	 */
	String CURRENT_NAME_SORT_KEY = "currentNameSort";

	/**
	 * Serves for getting a sort ordering for price field
	 */
	String CURRENT_PRICE_SORT_KEY = "currentPriceSort";

	/**
	 * Serves for getting name of last column name which has been sorted<br>
	 * It's used for ordering of sort fields
	 */
	String LAST_SORT_COLUMN_NAME_KEY = "lastSortColumnName";
	
}
